(function () {
    /**
     * 特殊牌型提示弹窗，继承至ui.Alert.SpecialUI
     * @class AlertSpecial
     * @constructor
     */
    function AlertSpecial() {
        AlertSpecial.super(this);
        this._tpl = '<div style="width:560px;line-height:48px;font-size:30px;font-family:microsoft yahei;color:#ffffff;">出现特殊牌型<span style="color:#ffed20;">{CardType}</span>，预计赢取每家<span style="color:#ffed20;">{CardWin}</span>，是否按特殊牌型出牌</div>';

        this.setup();
        this.initEvent();
    }
    Laya.class(AlertSpecial, "ui.Alert.Special", ui.Alert.SpecialUI);

    var _proto = AlertSpecial.prototype;
    /**
     * @privite
     * 设置弹窗位置
     */
    _proto.setup = function () {
        this.popupCenter = false;

        this.anchorY = 1;
        this.x = 55;
        this.y = 1300;
    }
    /**
     * @privite
     * 绑定出牌按钮事件
     */
    _proto.initEvent = function () {
        this.btnConfirm.on(Laya.Event.CLICK, this, function () {
            this.close("confirm");
        });
    }

    /**
     * @public
     * 显示特殊牌型弹窗
     */
    _proto.display = function (special) {
        special = special.split(",");
        var type = special[0];
        var win  = special[1];

        this.SpecialInfo.innerHTML = this._tpl.replace(/{CardType}/gi, type).replace(/{CardWin}/gi, win);

        this.popup();
    }
})();